let arr = [1, 2, 3, 4, 5];
for (var i:number = 0; i < arr.length; i++) {
    console.info(`for循环数组， arr数组下标为${i}时， 值为${arr[i]}`);
}
arr.forEach((value: Number, index: number, array: Number[]) => {
    // console.info(`forEach循环数组， arr数组下标为${arrCallBack.}时， 值为${arr[i]}`);
    console.info('forEach_value',value)
    console.info('forEach_index',index)
    console.info('forEach_array',array)
});

for (const value of arr) {
    console.info('for-of',value)
}

const filterRes = arr.filter(value => value > 2 && value < 5)
console.info('filter',filterRes)

const mapResult = arr.map(value => value > 1 && value < 5)
console.info('map',mapResult)

const reduceRes = arr.reduce((pre, current)=> pre + current, 100)
console.info('reduce', reduceRes)

